<div id="content">
	<div class="row s_page_title">
		<sa-big-breadcrumbs [items]="['围栏管理','围栏绑定']" icon="fa fa-map-marker" class="col-xs-12 col-sm-7 col-md-7 col-lg-4"></sa-big-breadcrumbs>
	</div>

	<sa-widgets-grid>
		<div class="s_table">
			<div sa-widget [editbutton]="false" color="darken" class="clearfix">
				<header><span class="widget-icon"> <i class="fa fa-table"></i> </span>
					<h2>围栏绑定</h2></header>
				<div>
					<div class="widget-body no-padding">
						<div class="page-header clearfix s_table_opreation">
							<div class="left page-header-btn">
								<div class="top_module">
									<span class="module_text">公司名称</span>
									<div class="company_tree" style="display: inline-block;vertical-align: middle;">
										<div class="clearfix" style="position: relative;">
											<div class="s_hover_box s_fix_radius">
												<input class="form-control tree_company_input" id="company" name="selectedCompanyName" (input)="companySearch()" autocomplete="off" [(ngModel)]='selectedCompanyName' (click)="companyClick()" type="text" placeholder="请选择或输入关键字" />
												<div class="s_del_icon" (click)='delText()'>x</div>
											</div>
											<div class="s_tree_box" id="tree_box">
												<div class="vision_tree" id="vision_tree">
													<div id="tree"></div>
												</div>
											</div>
										</div>
									</div>
								</div>
								<div class="top_module">
									<span class="module_text">车牌号</span>
									<div class="s_hover_box">
										<select class="select2" id="carNumberSelect2">
											<option value=''></option>
										</select>
										<div class="s_del_icon" (click)='del_carNumber()'>x</div>
									</div>
								</div>

								<!--<div class="selectDate top_module">
									<div class="input-daterange input-group s_selected_time_box s_hover_box">
										<input type="text" [(ngModel)]='startTime' class="form-control s_selected_time" id="datetimepicker1"  autocomplete="off" placeholder="选择开始时间"/>
										<span class="s_selected_time_spe">至</span>
										<input type="text" [(ngModel)]='endTime' class="form-control s_selected_time" id="datetimepicker2"  autocomplete="off" placeholder="选择结束时间"/>
										<div class="s_del_icon" (click)='del_date()'>x</div>
									</div>
								</div>-->

								<!--<div class="top_module">
									<span class="module_text">围栏名称</span>
									<input class="module_inp" type="text" [(ngModel)]="railName" />
								</div>-->

								<div class="top_module">
									<span class="module_text">卸货区域</span>
									<select name="" id="" class="module_inp" [(ngModel)]="mapMarkerId" style="width: 120px;">
										<option value="">全部</option>
										<option *ngFor="let item of railList" [value]="item.value">{{item.label}}</option>
									</select>
								</div>
								<button type="button" class="btn btn-primary" (click)="search_data()">查询</button>
								<button type="button" class="btn btn-primary" (click)="rail_bind()">配置卸货区域</button>

							</div>
						</div>
						<div class="table_scroll">
							<table class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
								<thead>
									<tr>
										<th>设备ID</th>
										<th>车牌号</th>
										<th>卸货区域</th>
										<th>所属公司</th>
										<th>更新用户</th>
										<th>更新时间</th>
									</tr>
								</thead>
								<tbody>
									<tr *ngFor="let row of tableData; let i = index" [attr.data-index]="i" [ngClass]='{selected: activeSelected[i] === row.id }' (click)="onSelect(row,$event,i)"  >
										<td>{{row.deviceId}}</td>
										<td>{{row.carNumber}}</td>
										<td>{{row.mapMarker.name}}</td>
										<td>{{row.parentName}}</td>
										<td>{{row.bindMapMarkUser}}</td>
										<td>{{row.bindMapMarkTime}}</td>
									</tr>
								</tbody>
							</table>
						</div>
						<div class="table-fix clearfix">
							<paginator [totalRecords]="totalCount" [rows]="pageSize" [currentPage]="curPage - 1" (onPageChange)="paginate($event)">
							</paginator>
							<button type="button" class="btn default refresh_btn" (click)="refresh()"><i class="fa fa-refresh"></i></button>
						</div>
					</div>
				</div>
			</div>
		</div>
	</sa-widgets-grid>

</div>